/**
 * Animation2D.java Created on : 14 juin 07
 */
package fr.limsi.seven;

/**
 * @author Camille
 */
public class Animation {

	/**
	 * Animation type constant
	 */
	protected static final int UNTYPIFIED_ANIM = 0;

	/**
	 * Animation type constant
	 */
	protected static final int TRANSLATION_ANIM = 1;

	/**
	 * Animation type constant
	 */
	protected static final int ROTATION_ANIM = 1;

	/**
	 * Animation type constant
	 */
	protected static final int SCALE_ANIM = 2;

	/**
	 * Animation type constant
	 */
	protected static final int COLOR_ANIM = 3;

	/**
	 * The animation {@link Thread}
	 */
	protected Thread animationThread;

	/**
	 * The animation type integer constant
	 */
	protected int animationType;

	/**
	 * Constructor for untypified animation
	 * 
	 * @param animationThread
	 *            the animation thread
	 */
	public Animation(Thread animationThread) {
		this.animationType = UNTYPIFIED_ANIM;
		this.animationThread = animationThread;
	}

	/**
	 * Constructor for typified animation
	 * 
	 * @param animationType
	 *            the animation type constant (if not sure put <i>0</i>)
	 * @param animationThread
	 *            the animation thread
	 */
	public Animation(int animationType, Thread animationThread) {
		this.animationType = animationType;
		this.animationThread = animationThread;
	}

	/**
	 * Getter for the animation thread
	 * 
	 * @return the animation {@link Thread}
	 */
	public Thread getThread() {
		return animationThread;
	}

	/**
	 * Getter for the animation type
	 * 
	 * @return the animation type integer constant
	 */
	public int getType() {
		return animationType;
	}

	/**
	 * Starts the animation (i.e Calls </i>animationThread.start()</i>)
	 */
	public void start() {
		animationThread.start();
	}
}
